package SimpleTaskService;

import javax.jws.WebService;

@WebService
public class TaskService {
	
	public UserResponse userLogin(String useremail, String userpassword)
	{			
				
		DataHelper dbHelper = new DataHelper();
		UserResponse userResponse = dbHelper.getUserLogin(useremail, userpassword);
					
		return userResponse;
	}	
	
	public UserResponse userSignUp(String useremail, String userpassword, String firstname, String lastname)
	{			
				
		DataHelper dbHelper = new DataHelper();
		UserResponse userResponse = dbHelper.signUpUser(useremail, userpassword, firstname, lastname);
					
		return userResponse;
	}
	
	public UserGroupResponse getUserGroups(int userid)
	{
		DataHelper dbHelper = new DataHelper();
		UserGroupResponse response = dbHelper.getUserGroups(userid);
					
		return response;		
	}
	
	public UserTaskListResponse getUserTaskLists(int userid)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskListResponse response = dbHelper.getUserTaskLists(userid);
					
		return response;
	}
	
	public UserTaskResponse getTasks(int tasklistid)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskResponse response = dbHelper.getTasks(tasklistid);
					
		return response;
	}
	
	public UserGroupResponse createGroup(int userid, String groupname)
	{
		DataHelper dbHelper = new DataHelper();
		UserGroupResponse response = dbHelper.createGroup(userid, groupname);
					
		return response;	
	}
	
	public UserTaskListResponse createTaskList(int usergroupid, String tasklistname)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskListResponse response = dbHelper.createTaskList(usergroupid, tasklistname);
					
		return response;
	}
	
	public UserTaskResponse creatTask(int tasklistid, String taskname)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskResponse response = dbHelper.creatTask(tasklistid, taskname);
					
		return response;
	}
	
	public UserTaskResponse updateTaskStatus(int taskid, int taskstatusid)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskResponse response = dbHelper.updateTaskStatus(taskid, taskstatusid);
					
		return response;
	}
	
	public UserTaskListResponse updateTaskListStatus(int tasklistid, int taskliststatusid)
	{
		DataHelper dbHelper = new DataHelper();
		UserTaskListResponse response = dbHelper.updateTaskListStatus(tasklistid, taskliststatusid);
					
		return response;
	}
}
